<template>
  <div class="content">
    <h2>category</h2>
  </div>
</template>

<script>
import eventBus from './utils/event-bus'
  export default {
    created() {
      eventBus.on('eventBannerClick', this.enventBannerClickHandler)
    },
    methods: {
      enventBannerClickHandler(name, age, info) {
        console.log("在category中监听:", name, age, info)
      }
    },
    unmounted() {
      console.log("category组件被卸载")
      eventBus.off('eventBannerClick', this.enventBannerClickHandler)
    }
  }
</script>

<style scoped>
</style>